import React from 'react';
import { cn } from '@/lib/utils';
import { HydrationBoundary, dehydrate, type QueryClient } from '@tanstack/react-query';


interface IPageContainerProps extends React.HTMLAttributes<HTMLDivElement> {
  queryClient?: QueryClient;
}

export const PageContainer: React.FC<IPageContainerProps> = (props) => {
  const { queryClient, className, ...otherProps } = props;

  return (
    <HydrationBoundary state={queryClient ? dehydrate(queryClient) : null}>
      <div className={cn('h-full', className)} {...otherProps} />
    </HydrationBoundary>
  );
};